// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity;

import android.text.TextUtils;
import android.widget.Toast;
import com.nnee.p_b.p_a.cls_d;
import com.nnee.p_fk.cls_j;
import com.nnee.p_pr.p_a.cls_i;
import com.nnee.p_pr.p_activity.p_view.cls_TouchInterceptor;
import com.nnee.p_pr.p_app.cls_PrisApp;
import com.nnee.p_pr.p_atom.cls_PRISNotification;
import com.nnee.p_pr.p_atom.cls_ad;
import com.nnee.p_pr.p_atom.cls_o;
import com.nnee.p_pr.p_atom.cls_q;
import com.nnee.p_pr.p_atom.cls_r;
import com.nnee.p_pr.p_atom.cls_u;
import com.nnee.p_pr.cls_b;
import com.nnee.p_pr.p_b.cls_a;
import com.nnee.p_pr.p_c.cls_h;
import com.nnee.p_pr.cls_v;
import java.util.Date;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

// Referenced classes of package com.nnee.p_pr.p_activity:
//            MainGridActivity, dc, ed

class cls_ak extends cls_b
{

	cls_ak(cls_MainGridActivity parammaingridactivity)
    { super();
        a = parammaingridactivity;
       
    }

    public void a()
    {
        com.nnee.p_pr.p_activity.cls_MainGridActivity.r(a);
        com.nnee.p_pr.p_activity.cls_dc.a(cls_j.a().c(), 403);
        if(cls_MainGridActivity.s(a) != null)
            cls_MainGridActivity.s(a).a(true);
    }

    public void a(int k)
    {
        if(com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k)))
            com.nnee.p_pr.p_activity.cls_MainGridActivity.v(a);
    }

    public void a(int k, int l)
    {
        com.nnee.p_pr.p_activity.cls_MainGridActivity.d(a, 0);
    }

    public void a(int k, int l, String s, boolean flag)
    {
        cls_MainGridActivity.t(a).b(k);
    }

    public void a(int k, com.nnee.p_pr.p_prot.cls_d d1, boolean flag)
    {
        cls_MainGridActivity.t(a).b(k);
    }

    public void b()
    {
    	cls_h.a(cls_MainGridActivity.p(a), com.nnee.p_b.p_a.cls_d.h().c(), false);
    }

    public void b(int k, int l, String s)
    {
        com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
    }

    public void b(int k, com.nnee.p_pr.p_prot.cls_d d1)
    {
        if(d1 != null) {
        	 if(d1.j.size() <= 0)
                 return; /* Loop/switch isn't completed */
             if(com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k)))
             {
                 com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
                 Toast.makeText(cls_MainGridActivity.p(a), 0x7f0a0077, 0).show();
             }
             
             if(d1.j.size() > 0)
             {
                 cls_u u1 = new cls_u();
                 u1.q(((cls_o)d1.j.getFirst()).a());
                 cls_MainGridActivity.c(a).remove(u1);
                 a.z = true;
                 com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, (com.nnee.p_pr.p_activity.p_a.cls_d)null);
             }
             
        }else {
        	if(com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k)))
                com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
        }
//_L1:
//        
//_L4:
//        return;
//_L2:
//       
//_L6:
//        if(d1.j.size() > 0)
//        {
//            cls_u u1 = new cls_u();
//            u1.q(((o)d1.j.getFirst()).a());
//            cls_MainGridActivity.c(a).remove(u1);
//            a.z = true;
//            com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, null);
//        }
//        if(true) goto _L4; else goto _L3
//_L3:
//        if(d1.i.size() <= 0 || !com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k))) goto _L6; else goto _L5
//_L5:
//        com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
//        Toast.makeText(cls_MainGridActivity.p(a), ((r)d1.i.getFirst()).e(), 0).show();
//          goto _L6
    }

    public void c(int k, int l, String s)
    {
        if(com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k)))
            com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
        com.nnee.p_pr.p_activity.cls_MainGridActivity.r(a);
        cls_u u1 = new cls_u();
        u1.q("-1");
        if(!cls_MainGridActivity.c(a).contains(u1))
            cls_MainGridActivity.c(a).add(u1);
        a.z = true;
        com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, (com.nnee.p_pr.p_activity.p_a.cls_d)null);
        com.nnee.p_pr.p_activity.cls_dc.a(cls_MainGridActivity.p(a), l);
        if(cls_MainGridActivity.s(a) != null)
            cls_MainGridActivity.s(a).a(true);
    }

    public void c(int k, com.nnee.p_pr.p_prot.cls_d d1)
    {
        if(!com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k)) || d1.g == null) {return;} else {
        	cls_PRISNotification prisnotification = d1.g.u();
            if(prisnotification != null) {
            	Date date = prisnotification.c();
                if(date == null)
                    return; /* Loop/switch isn't completed */
                String s = com.nnee.p_pr.p_b.cls_a.K();
                boolean flag = true;
                cls_q q1 = new cls_q();
                q1.g(s);
                if(!TextUtils.isEmpty(s) && q1.a() != null && q1.a().compareTo(date) >= 0)
                    flag = false;
                if(!flag)
                	return; /* Loop/switch isn't completed */
                List list = prisnotification.b();
                if(list == null || list.size() <= 0)
                	return; /* Loop/switch isn't completed */
                Iterator iterator = list.iterator();
                com.nnee.p_pr.p_atom.cls_PRISNotification.cls_PrisMessage prismessage = null;
                Date date1 = null;
                do
                {
                    if(!iterator.hasNext())
                        continue; /* Loop/switch isn't completed */
                    prismessage = (com.nnee.p_pr.p_atom.cls_PRISNotification.cls_PrisMessage)iterator.next();
                    date1 = prismessage.f();
                } while(date1 == null || q1.a() != null && !date1.after(q1.a()));
                com.nnee.p_l.p_b.cls_d.a(prismessage);
                com.nnee.p_pr.p_b.cls_a.e(prismessage.g());
            }
        }

    }

    public void d(int k, int l, String s)
    {
        if(com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k)))
        {
            com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
            com.nnee.p_pr.p_activity.cls_dc.a(cls_MainGridActivity.p(a), l);
        }
    }

    public void d(int k, com.nnee.p_pr.p_prot.cls_d d1)
    {
        LinkedList linkedlist = d1.h;
        a.z = true;
        com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, linkedlist);
    }

    public void e(int k, int l, String s)
    {
        if(com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k)))
        {
            com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
            com.nnee.p_pr.p_activity.cls_dc.a(cls_MainGridActivity.p(a), l);
        }
    }

    public void e(int k, com.nnee.p_pr.p_prot.cls_d d1)
    {
        if((d1 == null || d1.d()) && com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k)))
            com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
        if(d1 != null) {
        	 cls_MainGridActivity.t(a).a(cls_MainGridActivity.w(a) / 2, cls_MainGridActivity.x(a));
             if(!d1.e())
             {
                 long l = System.currentTimeMillis();
                 cls_h.a(a, com.nnee.p_b.p_a.cls_d.h().c(), l);
                 cls_h.a(a, com.nnee.p_b.p_a.cls_d.h().c());
             }
             if(!d1.e())
             {
            	 if(d1.g())
                 {
                     com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, d1);
                     if(d1.d())
                         com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, 313, d1.h, null, null);
                 } else
                 if(d1.f())
                 {
                     if(d1.i())
                     {
                         com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, d1);
                     } else
                     {
                         a.z = true;
                         com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, (com.nnee.p_pr.p_activity.p_a.cls_d)null);
                     }
                     if(!d1.j() && d1.d())
                     {
                         com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, 313, d1.h, null, null);
                         cls_v.a().l();
                     }
                 } else
                 if(d1.d())
                 {
                     a.z = true;
                     com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, (com.nnee.p_pr.p_activity.p_a.cls_d)null);
                     if(!d1.j() && d1.d())
                         com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, 313, d1.h, null, null);
                 }
             }
             else
             {
             com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, d1);
             if(d1.d())
                 com.nnee.p_pr.p_activity.cls_MainGridActivity.v(a);
             }
             cls_PrisApp.a().a(cls_MainGridActivity.c(a));
        }
 
    }

    public void f(int k, int l, String s)
    {
        if(com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k)))
        {
            com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
            com.nnee.p_pr.p_activity.cls_MainGridActivity.r(a);
            cls_u u1 = new cls_u();
            u1.q("-1");
            if(!cls_MainGridActivity.c(a).contains(u1))
            {
                cls_MainGridActivity.c(a).add(u1);
                a.z = true;
                com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, (com.nnee.p_pr.p_activity.p_a.cls_d)null);
            }
            com.nnee.p_pr.p_activity.cls_dc.a(cls_MainGridActivity.p(a), l);
            if(cls_MainGridActivity.s(a) != null)
                cls_MainGridActivity.s(a).a(true);
        }
    }

    public void f(int k, com.nnee.p_pr.p_prot.cls_d d1)
    {
        if(com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k)))
            com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
        if(d1 != null) {
        	int l;
            if(d1.h.size() > 0)
            {
                Iterator iterator = d1.h.iterator();
                l = 0;
                do
                {
                    if(!iterator.hasNext())
                        break;
                    cls_u u1 = (cls_u)iterator.next();
                    if(!cls_MainGridActivity.c(a).contains(u1))
                    {
                        cls_MainGridActivity.c(a).add(-1 + cls_MainGridActivity.c(a).size(), u1);
                        l++;
                    }
                } while(true);
            } else
            {
                l = 0;
            }
            if(l > 0)
            {
                a.z = true;
                com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, (com.nnee.p_pr.p_activity.p_a.cls_d)null);
                if(com.nnee.p_b.p_a.cls_d.h().i() && cls_i.a(com.nnee.p_pr.p_b.cls_a.p(), 10, 10))
                    com.nnee.p_l.p_b.cls_d.a(cls_MainGridActivity.p(a), 256);
            }
        }
 
    }

    public void g(int k, com.nnee.p_pr.p_prot.cls_d d1)
    {
        if(d1 != null) {
        	if(!com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k)))
                return; /* Loop/switch isn't completed */
            com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
            long l = System.currentTimeMillis();
            cls_h.a(a, com.nnee.p_b.p_a.cls_d.h().c(), l);
            cls_h.a(a, com.nnee.p_b.p_a.cls_d.h().c());
            com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, 313, d1.h, null, null);
            if(cls_MainGridActivity.y(a) != 0)
                {
            	if(1 != cls_MainGridActivity.y(a)) {
            		
            	} else {
            		com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, d1);
            	}
            	cls_PrisApp.a().a(cls_MainGridActivity.c(a));
                }
            else
            {
            com.nnee.p_pr.p_activity.cls_MainGridActivity.a(a, d1);
            if(cls_i.a(com.nnee.p_pr.p_b.cls_a.p(), 10, 10))
                com.nnee.p_l.p_b.cls_d.a(cls_MainGridActivity.p(a), 256);
            }
            cls_PrisApp.a().a(cls_MainGridActivity.c(a));
        }else {
        	if(com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).contains(new Integer(k)))
                com.nnee.p_pr.p_activity.cls_MainGridActivity.u(a).remove(new Integer(k));
        }

    }

    final cls_MainGridActivity a;
}
